package com.pb.web.action;

import org.apache.logging.log4j.message.StringFormattedMessage;

import com.opensymphony.xwork2.ActionSupport;

public class HouseAction extends ActionSupport {

	private static final long serialVersionUID = -7804732371863659425L;

	/**
	 * 发布房屋信息
	 * 
	 * @return
	 */
	public String addHouse() {
		// 模拟实现发布房屋信息时异常情况
		try {
			if (true) {
				// 调用Service方法
				throw new Exception();
			}
		} catch (Exception e) {
			return ERROR;
		}
		return SUCCESS;
	}

	/**
	 * 删除房屋信息
	 */
	public String deleteHouse() {
		// 模拟实现删除房屋信息时异常情况
		try {
			if (true) {
				// 调用Service方法
				throw new Exception();
			}
		} catch (Exception e) {
			return ERROR;
		}
		// 调用Service方法
		return SUCCESS;
	}
}
